<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use DB;

class SuperviseCompany extends Model
{
    protected $table = 'supervise_company';

    public $timestamps = false;

    public function getNumByArea()
    {
    	$sql = "select area_point.id,area_point.area_id,area_point.lng_lat,area_point.color,supervise_company.num,area.name  from area_point 
    			left join supervise_company on area_point.area_id=supervise_company.area_id
    			left join area on area_point.area_id = area.id
    			";
    	$res = DB::select($sql);
    	return $res;
    }
}
